#include "ego_planner_adapter/target_relay.hpp"
#include <rclcpp/rclcpp.hpp>
#include <memory>

int main(int argc, char** argv) {
    rclcpp::init(argc, argv);
    
    // Create node options
    rclcpp::NodeOptions options;
    
    // Create the target relay node
    auto node = std::make_shared<ego_planner_adapter::TargetRelay>(options);
    
    RCLCPP_INFO(node->get_logger(), "Starting TargetRelay node");
    
    try {
        // Spin the node
        rclcpp::spin(node);
    } catch (const std::exception& e) {
        RCLCPP_ERROR(node->get_logger(), "Exception during execution: %s", e.what());
    }
    
    RCLCPP_INFO(node->get_logger(), "TargetRelay node shutting down");
    rclcpp::shutdown();
    return 0;
}